/*
 * lfs_flag.h
 *
 *  Created on: Dec 8, 2012
 *      Author: duoln
 */

#ifndef LFS_FLAG_H_
#define LFS_FLAG_H_

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef RELEASE
#define LOG_SCREEN false
#define LOG_CACHE  true
#else
#define LOG_SCREEN true
#define LOG_CACHE  false
#endif

/* Define string len */
#define NAMESPACE_LEN 2048
#define FILENAME_LEN 256
#define HOST_LEN 256

#define TIME_MIN (0)
#define TIME_MAX (1 >> 30)

/* master server */

#define MASTER_HANDLER_FILE_META        "MH_GET_FILE_META"
#define MASTER_HANDLER_FILE_CREATE      "MH_FILE_CREATE"
#define MASTER_HANDLER_FILE_WRITE       "MH_FILE_WRITE"
#define MASTER_HANDLER_FILE_DELETE      "MH_FILE_DELETE"
#define MASTER_HANDLER_FILE_META_UPDATE "MH_FILE_META_UPDATE"
/* chunk server */
#define CHUNKSERVER_HANDLER_ADD_CHUNK   "CS_ADD_CHUNK"

/* file status */
#define OP_N  0x0000  /* Disabled */

#define OP_D  0x0100  /* Deleted */
#define OP_X  0x0011  /* Read and Write */
#define OP_R  0x0010  /* Only Read */
#define OP_W  0x0001  /* Only Write */

#ifdef __cplusplus
}
#endif

#endif /* LFS_FLAG_H_ */
